#!/usr/bin/env python
import sys
import os

disk_usage={}
disk_usage_alert={}
check_type=sys.argv[1]
alert_value=sys.argv[2]
check_list={'block':'df -P | tail -n +2','inode':'df -P -i | tail -n +2'}
for i in os.popen(check_list[check_type]):
        disk_usage[i.split()[5]]=i.split()[4][:-1]
for i in disk_usage:
        if int(disk_usage[i]) > int(alert_value):
                disk_usage_alert[i]=disk_usage[i]
if not disk_usage_alert:
        print 0
else:
        for i in disk_usage_alert:
                print i + ':' + disk_usage_alert[i] + '%,',
                
